package com.shyroke.daydayzhuanapi.entity;

import lombok.Getter;
import lombok.Setter;

import javax.persistence.*;
import java.io.Serializable;

@Getter
@Setter
@Entity
@Table(name = "subject_app")
public class SubjectAppEntity extends BaseEntity implements Serializable {

    @Column(name = "app_id",insertable = false, updatable = false)
    private Integer appId;

    @ManyToOne(fetch = FetchType.EAGER)
    @JoinColumn(name = "app_id",referencedColumnName = "id")
    private AppEntity appEntity;

    @Column(name = "subject_id",insertable = false, updatable = false)
    private Integer subjectId;

    @ManyToOne(fetch = FetchType.EAGER)
    @JoinColumn(name = "subject_id",referencedColumnName = "id")
    private SubjectEntity subjectEntity;

}
